home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d5 / pmusic12.arc / POLY.H < prev    next >
Text File  |  1990-01-29  |  1KB  |  55 lines

  1. /*
  2. *
  3. * poly.h -- defines for the Polyphonic Music functions
  4. *
  5. ****************/
  6.  
  7. /* note values of octave which contains middle C on my TURBO XT cloane */
  8. #define CNAT_M 390 
  9. #define CSHA_M 413
  10. #define DNAT_M 438
  11. #define DSHA_M 462
  12. #define ENAT_M 490
  13. #define ESHA_M 519
  14. #define FNAT_M 519
  15. #define FSHA_M 550
  16. #define GNAT_M 583
  17. #define GSHA_M 618
  18. #define ANAT_M 655
  19. #define ASHA_M 694
  20. #define BNAT_M 736
  21. #define BSHA_M 779
  22.  
  23. /* 
  24.    note: to find a note value, newval, ONE HALF STEP above a value x:
  25.                newval = x / 0.94365
  26.    ONE HALF STEP below: 
  27.                newval = x * 0.94365
  28. */
  29.  
  30. /* defines for voice, tempo, values, etc. */
  31.  
  32. #define TCHANGE    16384   /* constant values to use in poly() and tritone() */
  33. #define V1    32768
  34. #define V2     40960
  35. #define V3    49152
  36. #define V4      53744   /* note: this is only in prototype stages, poly() will interpret as V3 */
  37. #define DUR    8192
  38. #define KBCHECK 24576
  39. #define STOP    0
  40.  
  41. /* function definitions: */
  42.  
  43. int playpoly(char *, int);
  44. int looppoly(char *, int);
  45. int playpolykb(char *, int);
  46. int looppolykb(char *, int);
  47.  
  48. unsigned *sngopen(char *plyfilename, int defaulttempo);
  49. int sngclose(unsigned *tune);
  50.  
  51. unsigned plytempo( int, int, unsigned, unsigned );
  52.  
  53. void poly( unsigned * );
  54. void polykb( unsigned * );
  55.